﻿using Microsoft.Xna.Framework;
using GameLibrary;

namespace Rescue_of_the_Dwarvenzombies.SceneObjects.GameObjects.Items.NonConsumableItems
{
    internal class Weapon : NonConsumable, IMovable
    {
        private bool isRange;
        private float areaOfImpact;
        private float _damage;

        /// <summary>
        /// Initializes a new instance of the Weapon class.
        /// </summary>
        /// <param name="move">The move.</param>
        /// <param name="direction">The direction.</param>
        /// <param name="wantedAction">The wanted action.</param>
        /// <param name="position">The position.</param>
        /// <param name="damage">The damage.</param>
        public Weapon(Vector2 move, Constant.Direction direction, Constant.Action wantedAction, Vector2 position, float damage)
        {
            WantedMove = move;
            WantedAction = wantedAction;
            TextureName = Constant.AXE_TEXTURE_NAME;
            Position = position;
            Direction = direction;
            _damage = damage;
            TintColor = Color.White;
            RectangleHeight = Constant.AXE_RECTANGLE_HEIGHT;
            RectangleWidth = Constant.AXE_RECTANGLE_WIDTH;
            RectangleOffsetX = Constant.AXE_RECTANGLE_OFFSET_X;
            RectangleOffsetY = Constant.AXE_RECTANGLE_OFFSET_Y;
            TotalTextureWidth = Constant.AXE_TOTAL_TEXTURE_WIDTH;
            SourceRectangle = new Rectangle(0, 0, Constant.AXE_RECTANGLE_WIDTH, Constant.AXE_RECTANGLE_HEIGHT);
            BoundingBox = new BoundingBox(new Vector3(position.X, position.Y, 0), new Vector3(position.X + RectangleWidth, position.Y + RectangleHeight, 0));
        }

        /// <summary>
        /// Gets the damage.
        /// </summary>
        /// <returns></returns>
        public override float GetDamage()
        {
            return _damage;
        }
    }
}